import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
import axios from 'axios'
import qs from 'qs'

// 查询企业人员列表
export function listPersonnel(query){
  return request({
     url: '/aqsc/personnel/list',
     method: 'get',
     params: query
   })
}
// 新增企业人员
export function addPersonnel(params){
  return request({
    url:'/aqsc/personnel/save',
    method: 'post',
    params
  })
}

//  修改企业人员
export function updatePersonnel(params){
  return request({
    url:'/aqsc/personnel/save',
    method: 'post',
    params 
  })
}
//删除企业人员
export function delPersonnel(personntlId) {
  return request({
    url: '/aqsc/personnel/remove/' + personntlId,
    method: 'delete'
  })
}

//查询企业人员个人信息
export function getPersonnelProfile(personntlId) {
  return request({
    url: '/aqsc/personnel/info/' + personntlId,
    method: 'get'
  })
}
// 批量删除企业人员信息
export function removesPersonnel(arrayId){
  return request({
    url : '/aqsc/personnel/removes/'+arrayId,
    method: 'delete',
  })
}
// 获取角色信息
export function getARole(){
  return request({
    url : '/aqsc/personnel/role/list1',
    method:'get'
  })
}
// 文件上传
export function uploadfile(data){
  return request({
    url: '/aqsc/personnel/upload',
    method:'post',
    data,
    headers:{
        'Content-type':'multipart/form-data'
    }
  })
}

export function uploadAvatar(data) {
  return request({
    url: '/aqsc/personnel/upload',
    method: 'post',
    data: data
  })
}